package com.liao.es.dao;

import com.liao.es.pojo.Shopping;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface PhoneDao extends CrudRepository<Shopping,String>,PhoneCustomDao {

    List<Shopping> findAll();

    @Query("{\"match\":{\"?0\":\"?1\"}}")
    List<Shopping> findByQuery(String field,String term);

}
